from src.config import Config

import os

class ContentManager:

    def __init__(self):
        pass

    @staticmethod
    def download(title: str, url: str, only_audio=False):
        config = Config()
        
        command = "yt-dlp "
        if only_audio: command += "-x --audio-format mp3 "
        command += url + f" --output '{config.VideoDownloadDirectory}/{title}.webm'"
        print(command)
        os.system(command)


